﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuanLyCuaHangBanMayTinh.He_Thong_Xu_Ly;
using QuanLyCuaHangBanMayTinh.He_Thong_Du_Lieu;

namespace QuanLyCuaHangBanMayTinh
{
    class NhapHangBUS
    {
        public static bool ThemMatHang(NhapHangDTO mh)
        {
            if (NhapHangDAO.SelectmhByName(mh.TenMatHang) == null)
            {
                NhapHangDAO.Insert(mh);
                return true;
            }
            else
            {
                return false;
            }
        }
            
            public static bool XoaMATHANG(NhapHangDTO mh)
            {
            if (NhapHangDAO.SelectmhByName(mh.TenMatHang) == null)
            {
                NhapHangDAO.Delete(mh);
                return true;
            }
            else
            {
                return false;
            }
        
            }
        }


    }

